home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.7 KB | 87 lines | [TEXT/GEOL] |
- Item 9473971 7-Jan-91 10:33PST
-
- From: D3861 Electronics for Imaging,Avi Bar,PRT
-
- To: MACAPP.TECH$ MacApp Technical
-
- ------------------------------------------------------------------------------
-
- Sub: Floating windows bug fixes
-
- Here are fixes for some subtle bugs in the MacApp floating windows package.
-
- ----
-
- 1. Menus not enabled correctly after resume event in MultiFinder.
-
- Status: happens sometimes; reported to Apple
-
- Reason: It appears that as a result of the showing of floating windows on a
- resume event, the target chain is sometimes not set to the proper non-floating
- active window. Thus, the DoSetupMenus method does not go through the right
- target chain, and the active window does not get a chance to enable its menus.
-
- Fix: (suggested by Chris Muir, EFI)
- Save the target on a suspend event and restore it on a resume event.
-
- In TApplication (or subclass) add a field:
-
- fSavedTarget: TEvtHandler;
-
- In TApplication.IApplication (or override) add this line:
-
- fSavedTarget := self;
-
- In TApplication.AboutToLoseControl (or override) add this line at the end:
-
- fSavedTarget := gTarget;
-
- In TApplication.Regain Control (or override) add these two lines at the end:
-
- if gTarget <> fSavedTarget then
- SetTarget(fSavedTarget);
-
- Note: In THINK Pascal, due to as yet unresolved floating windows bugs, it is
- wise to put all floating-windows-related changes inside {$IFC qFloaters}. In
- compile options, put "qFloaters = 1;" for standalone application projects, but
- put "qFloaters = 0;" for projects to be run under the LightsBug environment.
-
- ----
-
- 2. With a floating window present, the wrong document name will appear in
- LaserWriter status indicators such as PrintMonitor.
-
- Status: replicable
-
- Reason: MacApp sets the print dialog (cancel window) title to the title of the
- document window being printed -- BUT it doesn't then call PrValidate so the
- name will be noticed. (See Tech Note #149.) PrValidate is called before the
- cancel window appears, so it uses the title of the front window, which may be a
- floating window instead of the document window.
-
- Fix: Do another PrValidate so the title will be noticed, calling it after the
- cancel window appears.
-
- If you have a subclass of TStdPrintHandler, add this override method:
-
- procedure TSubclassPrintHandler.PosePrintDialog;
- override;
- begin
- inherited PosePrintDialog;
- if PrValidate(THPrint(fHPrint)) then
- ;
- end;
-
- If you would rather modify MacApp, simply add these lines to the end of
- TStdPrintHandler.PosePrintDialog:
-
- if PrValidate(THPrint(fHPrint)) then
- ;
-
- ----
-
- Submitted for your approval,
- Tim Maroney,
- Electronics for Imaging
-
-